package swing;

import javax.swing.*;
import java.awt.*;

public class Demo4 extends JFrame {
      public Demo4(){
        setBounds(100,100,200,150);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        Container c =getContentPane();
        c.setLayout(null);
        JButton b1 = new JButton("按钮1"),b2 = new JButton("按钮2");
        
        b1.setBounds(10,30,80,80);
        b2.setBounds(60,70,100,20);
        c.add(b1);
        c.add(b2);
        setVisible(true);

    }

    public static void main(String[] args) {
        new Demo4();
    }
}
